<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<jsp:include page="../head.jsp"></jsp:include>
<body>
<form id='fmTbArea'  action="TbAreaServlet?method=${sessionScope.tbArea==null?'add':'edit'}" method="post">
 <input type="hidden" name="areaId" id="areaId" value="${sessionScope.tbArea.areaId}" />
<table>
<tr><td colspan='2'></td></tr>
<tr>
    <td>地区邮编</td>
    <td><input type='text' name='areaPostCode' id='areaPostCode' value='${sessionScope.tbArea.areaPostCode }' /></td>
</tr>
<tr>
    <td>地区名称</td>
    <td><input type='text' name='areaName' id='areaName' value='${sessionScope.tbArea.areaName }' /></td>
</tr>
<tr>
    <td>所属地区</td>
    <td>
    <select name='parentAreaId' id='parentAreaId' >
		<option value="0">无</option>
	<c:forEach items="${sessionScope.tbAreaList}" var="tbArea" varStatus="status">
		<option value="${tbArea.areaId }" ${sessionScope.tbArea.parentAreaId == tbArea.areaId?'selected':''}>${tbArea.areaName}</option>
	</c:forEach>
</select></td>
</tr>
<tr>
    <td>地区备注</td>
    <td><input type='text' name='areaMemo' id='areaMemo' value='${sessionScope.tbArea.areaMemo }' /></td>
</tr>
<tr>
    <td colspan='2' align="center"><input type="submit" name="btsubmit" id="btsubmit" value="${sessionScope.tbArea==null?'添加':'修改'}" /><input type='reset' value='重置' /><input type='button' value='返回' onclick='history.go(-1);' /></td>
</tr></table>
</form><jsp:include page="../foot.jsp"></jsp:include>
</body></html>